#include "Logger.h"

#include <log4cpp/Category.hh>
#include <log4cpp/PropertyConfigurator.hh>

static const std::string LoggerInitFileName = "log4cpp.properties";

Logger::Logger() {

  init();

}
Logger::~Logger(){
  log4cpp::Category::shutdown();
}



void Logger::init() {

  try {
    log4cpp::PropertyConfigurator::configure(LoggerInitFileName);
  }
  catch(...) {
    std::cout << __func__ << " ERROR : logger property init failed " << LoggerInitFileName << std::endl;
  }
}

/*
void logMsg(logType lType, std::string& msg,
            const std::string& SERVER_LOGGER) {

  log4cpp::Category& logger =
      log4cpp::Category::getInstance(std::string(SERVER_LOGGER));

  if (lType == DEBUG) {

  }
  else if (lType == INFO) {

  }
}
*/
